__label__YES ">- the main vehicle code gets a new **thrust_loss_check** function that looks for signs the vehicle is suffering from a loss of thrust for at least second."
__label__NO "if triggered the motor library's **set_thrust_boost** method is called to allow the motor lib to go into a thrust-boost mode to try and recover."
__label__YES "to trigger there must be: - a lost of angular control of at least .degrees (@lthall, should this be degrees?) - overall average throttle must be % and motor library reports at least one motor has hit its upper limit - vehicle is not climbing - motormatrix library gets a new **check_for_failed_motor** method that uses a hz average of the motor outputs and some heuristics to determine if a motor failure is probably happening."
__label__NO "this combined with the trigger from the vehicle code enables the recovery."
__label__YES "- the motor matrix recovery method involves: - removing the failed motor from the check that would otherwise limit other motors outputs from climbing."
__label__YES "i.e. normally if one motor goes to full, the opposite motor is forced low..."
__label__NO "this does not happen with this patch."
__label__NO "- disabling current limiting?"
__label__NO ">[here is a video of a simulator test with a hexacopter]("
__label__YES "battmonitor: fix failsafe conversion"
__label__YES "the parameter conversion code was tested when the failsafes were called `batt_fs_low_volt` which i later renamed for string length reasons, but i missed fixing all the conversion code."
__label__NO "this affects all the released vehicles."
__label__NO ">i've only tested plane locally due to issues with compiling older versions of copter/sub so i need some assistance with that."
__label__NO "(the test is to clear your parameters (set the `format_version` to for example and reboot, then set `fs_low_volt` `fs_low_mah` and the failsafe action on copter, then install firmware with this patch and check that `batt_low_volt`, `batt_low_mah` and `batt_fs_low_act` on copter are all set."
__label__NO ">edit: this deletes really old ( era) param conversion code as it interferes with the newer batt monitor param conversion code."
__label__YES "ap_arming: add servo voltage check, paramertise the vcc check"
__label__YES "needed to prevent arming with extremely bad/questionable servo power supply."
__label__YES "the board rail was parameterized on the lower side as it allows the user to specify a higher minimum voltage then the default range, which can be convenient when dealing with backup regulators."
__label__YES "rover: add continue-in-auto option to rc failsafe"
__label__YES "rover supports the rc failsafe (aka throttle failsafe) which triggers when the transmitter is turned off."
__label__NO "unlike copter though, once enabled, it triggers in all modes."
__label__YES "instead we should add the ability to *not* trigger the failsafe if in auto mode."
__label__NO "copter: rpm and current feedback from esc"
__label__NO "is it possible to receive motor feedback from the escs through the signal line?"
__label__YES "> if yes, add this apm firmware feature: - during transition from pre-operation to flight as the throttle is being initiated have the apm run a quick feedback check and compare on the escs for motor current draw."
__label__NO "this could effectively be a propeller check to verify proper installation, condition and matching."
__label__YES "if the results are not within x% of each escs the apm would alarm and disarm."
__label__NO "this capability could stop some of the flips received from improper propeller installations."
__label__YES "note: with the manner that firmware .. rc spins up propellers the apm could possibly do this check upon the first momentary fast propeller spin before the propellers settle to their default slow spin. ???"
__label__YES ">the idea is that a propeller turning in the opposite direction of design would create a measurably different current draw (thrust) as a properly spinning propeller."
__label__YES "this would be easily recognized electronically from a comparison to the other running motors and could stop the apm from arming the vehicle in a faulty configuration."
__label__YES "thus, eliminate some machine flips or for the hex and oct stop them flying with improper configurations."
__label__NO "of course - if the props do not cause a motor current draw difference then all these words are ---- just words."
__label__YES "copter: information on the screen for the reason of failsafe"
__label__YES "mission planner gives the message of failsafe, but not specified the anomaly that has activated: it would be very useful to have immediately detailed information with the parameter and the eventual value"
__label__NO "coter: add support for external siren / screamy"
__label__NO "philip, tridge and i had a talk about this and we decided: - tridge or randy will make an ap_notify object for an external buzzer."
__label__NO "it will take one parameter which will allow choosing which relay is used to sound the siren."
__label__NO "- because of an issue with the relay pins always being pulled high when the pixhawk boots, the relay pin will be pulled _low_ when the siren should be sounded."
__label__NO "this means we will need a physical relay to switch around the signal."
__label__NO "- randy will document how to connect the external buzzer on the wiki and we hope that some manufacturer will create a plug-and-play solution so that large numbers of people can enjoy the new feature - this won’t make ac. but will make ac.."
__label__NO "copter-.: check aux switch and mode switch inputs are within range"
__label__NO "this pr helps resolve [this issue re the frsky sbus receivers]( in copter-. (equivalent to [this pr on master]("
__label__YES "the underlying issue is that some channels recover faster than others from a failsafe."
__label__NO "in particular we have seen cases where the lower channels recover first but the upper channels (used for auxiliary switches) recover much later."
__label__YES "before the higher channels have recovered they report as their value which can cause the vehicle disarming itself in the air if the arm/disarm function has been attached to the aux switch."
__label__NO ">this has been tested in sitl."
__label__NO ![sitl-test](
__label__YES "copter: disarmed mid-air when radio failsafe recovered (frsky receiver)"
__label__NO "### bug report"
__label__NO ">**issue details**"
__label__YES ">arducopter .. disarms while flying auto mission when radio reception came back - please see details in log at second .."
__label__YES "> i had earlier werid behaviours (quad yawing degrees when radion comes back)"
__label__NO ">i am flying in failsafe mode ""continue with mission when rx lost'"
__label__NO >**version**
__label__NO ">arducopter .."
__label__NO ">**platform** [ ] all [ ] antennatracker [x] copter [ ] plane [ ] rover [ ] submarine"
__label__NO ">**airframe type**"
__label__NO ">quad, x"
__label__NO ">**hardware type**"
__label__NO >cube
__label__NO ">**logs** _please provide a link to any relevant logs that show the issue_"
__label__YES "copter: set home on arming vs in air without prior d lock"
__label__YES "when flying before d lock is achieved, it is possible to get d lock in the air."
__label__YES "the gps position is most likely not accurate enough to store and could be miles away from the actual position."
__label__YES ">if the user rtl's or enters failsafe the copter will fly away."
__label__YES ">the user should receive notification home is not set on the gcs and the craft should loiter instead of rtl if home is not set by arming."
__label__NO "any other reasonable alternative fallback approaches are welcome in the comments."
__label__NO ">the goal here is to be defensive against user error and not blaming the user."
__label__NO jason
__label__YES "plane: manage quadplane throttle during rc failsafe"
__label__YES "the current behavior is the moment a rc failsafe starts we immediately reset all control input values to ."
__label__YES "this is reasonable for all the flight control surfaces, and reasonable for throttle in a normal fixed wing mode, however with a quadplane this can lead to maximum rate descents (or freefall) if the vehicle was in a vertical flight mode."
__label__YES "this instead simply resets the throttle to % input which would maintain altitude in any of the altitude hold modes, continues to land in qland/qrtl, and in qstabilize should result in hover throttle which avoids a sudden drop/spin on the airframe."
__label__YES ">the extra call to `control_failsafe()` is required to ensure that if you swap from a quadplane mode to something like manual during the failsafe that there is not a momentary blip of % throttle."
__label__YES "ahrs: add dcm/ekf attitude consistency pre-arm check"
__label__YES "we should add an attitude consistency pre-arm check to all vehicles that checks that all active ahrs cores (dcm, ekf, ekf) have consistent attitudes and if not, display a pre-arm check."
__label__YES ">this issue was raised in response to [this crash report]( in which the backup ekf's roll estimate flipped over."
__label__YES "the vehicle was allowed to takeoff and it flew fine for a while until the ekf selector decided the backup was the better choice and the vehicle crashed."
__label__YES "ahrs: add pre-arm check that attitudes are consistent"
__label__YES "this pr adds and changes two pre-arm checks to resolve [this issue]( which stems from a [crash of a vehicle running copter-..]( where the backup ekf flipped over while the vehicle was disarmed (probably because the user ran a compass calibration but did not reboot the board because the pre-arm compass checks were disabled)."
__label__YES ">- makes the compass calibration pre-arm checks mandatory (i.e. they cannot be turned off) - adds a new attitude check that all ahrss (dcm, ekf, ekf) are close to the attitude from whichever of these is primary."
__label__NO "the threshold is set to deg roll/pitch, deg yaw."
__label__NO "this new check is part of the ins pre-arm checks."
__label__NO ">this has been tested in sitl by adding some debug and then setting these parameters to throw off some of the attitude estimates."
__label__NO ">to make the roll/pitch check fail i adjusted the accelerometer offsets as follows: - param set ins_accofs_x"
__label__NO ">to make the yaw check fail i set the compass offsets as follows: - param set compass_ofs_x - param set compass_ofs_y"
__label__NO ">picture of some sitl testing ![att-check-sitl]("
__label__YES "plane: prevent loss of control when q_enable is set while flying"
__label__NO "the key point here actually crept up on my by accident."
__label__NO "i noticed we inconsistently swap between `available()` and `enable` for early return checking."
__label__NO "the problem with enable is that you can get into the situation where q_enable wasn't set on the ground, and is changed in flight."
__label__YES "this results in the aircraft not allocating objects (because we refuse to do setup while armed), but then `update_throttle_hover` can do a nullptr dereference, and `in_vtol_auto` can report true causing the vehicle to hand control over (until we segfault in `update_throttle_hover` anyways)."
__label__NO ">i took a paranoid approach of converting everything that used enable to `available()`."
__label__NO "i made `available()` also check `enable`, but i'm not really sure that is the correct action."
__label__YES "(setting enable to while flying could then result in not updating motors/leaving them free spinning at last commanded throttle)."
__label__NO ">also rename `check_throttle_suppression` to `update_throttle_suppression` to reflect that this actually can change the outputs."
__label__YES "copter: speed up ekf failsafe by checking if velocity innovations > x fs_ekf_thresh"
__label__YES "copter's ekf failsafe checks if out of innovations (compass, velocity, position) are greater than the fs_ekf_thresh parameter value."
__label__YES "if they are (for more than a second or two) the failsafe triggers."
__label__YES ">in cases where the gps position/velocity has gone bad, we can likely speed up triggering of the ekf failsafe if we also trigger in cases where the velocity innovations are greater than twice the fs_ekf_thresh."
__label__YES ">here is a graph from one log in which the compass was fine, but the gps was providing terrible positions and velocities."
__label__YES "in this case the gps itself also reported that it had very little idea of where it was."
__label__YES "despite this it took seconds for the ekf failsafe to trigger."
__label__NO >![corrado-innovations](
__label__NO "rover: separate failsafe actions for rc and gcs failsafes"
__label__NO "currently failsafe is very basic, it should be improved to allow to sperate action on different type, loggin etc ."
__label__YES "arming: allow checking all ekf cores for health"
__label__YES "this is intended to actually check that all the ekf cores are actually healthy, rather then just having the primary core be healthy."
__label__NO "i didn't tag the other vehicles yet, as it wasn't obvious to me under what situations copter/rover want to run the check."
__label__NO ">overall i'd love to see the ahrs arming check become common."
__label__YES ">i haven't flight tested this yet, was just spun out as a side effect of paul's presentation, and should be reviewed more."
__label__NO "ap_gps: remove external event from septentrio driver"
__label__NO "the septentrio driver was logging camera feedback that the gps witnessed."
__label__YES "this was useful from a minimum hardware perspective, but it does pose a safety risk to flight."
__label__YES "if to many events are triggered (due to noise on the input pin, or a truly fast camera) you can create congestion on the serial port to the gps and the position data gets delayed."
__label__YES "we detect this in the health bits, but the lag the data experiences becomes significant enough that the ekf will start rejecting the gps data."
__label__YES "this leads to oscillations in the sky, and all kinds of horrifying stuff happening."
__label__NO "to correct for this i've removed the feedback into ardupilot."
__label__YES "i'm happy to restore it in the future if there is a patch on the gps firmware that would prevent this from blocking the flight critical positioning data."
__label__YES "as a note the gps did detect the buffer overflow/port congestion, and we did detect it on the ardupilot side."
__label__NO "this does not have any impact on the ppk workflow, all events are still logged to the gps sd card the same as they were before."
__label__NO ">example of external event induced lag (this line of timestamps should be perfectly flat, instead of bending in the middle): ![figure_]("
__label__NO ">this also makes a change to ensure that we log receiver status to the gps sd card."
__label__NO "this is useful for problem analysis, when the statustext message from the autopilot gets lost, or the user has misplaced the log files."
__label__NO ">this was test flown on a asterx-m"
__label__NO ">@amilcarlucas this patch may be of interest to you."
__label__NO "copter: confirm that imu failover works correctly"
__label__YES "this issue on diyd suggests that at least in some cases, the imu fail-over didn't work."
__label__NO 
__label__NO ">this issue is raised to focus that investigation (although we could also do it on discuss)"
__label__YES "gcs_mavlink: disable reboot when armed"
__label__NO "this prevents reboot on vehicles that have arming_require=, which applies to some planes, but those vehicles tend to not use mavlink reboot anyway."
__label__YES ">this pr was requested by edin from aeronavics after an incident where a reboot was accidentally requested while flying"
__label__NO "heli - replace h_land_col_min with h_col_mid"
__label__NO "this is implemented to prevent issues with new spool logic in copter .."
__label__YES "it prevents users from failing to set h_land_col_min properly, or failing to set it at all, which causes ground resonance, potential loss of attitude solution during landing and subsequent dynamic rollover."
__label__YES "watchdog reset copter in flight without apparent problem"
__label__NO "### bug report copter master flying fmuv (cubesolo build target) on a stock solo pixhawk cube."
__label__YES "watchdog reset the fc while the copter was in flight for seemingly no reason causing it to crash."
__label__NO "the copter was under control, flying normally, and there are no errors or irregularities in the log that i can readily see."
__label__YES "the operator was flying normally, the motors stopped, and while falling the reboot tones were audible."
__label__NO "the log file that began after the reboot contains `-- :: prearm: internal errors detected (x)` which indicates the fc rebooted by watchdog."
__label__NO ">**version** copter .-dev from // (fmuv)"
__label__NO ">**platform** [ ] all [ ] antennatracker [x] copter [ ] plane [ ] rover [ ] submarine"
__label__NO ">**airframe type** dr solo quadcopter"
__label__NO ">**hardware type** pixhawk . cube"
__label__NO ">**logs** [watchdog reset.zip]("
__label__NO "rangefinder arming checks"
__label__NO "this starts on a global set of arming checks on rangefinders."
__label__NO "for now it simply introduces the requirement that if a rangefinder was specified, then we must have created a driver for it."
__label__NO ">this was actually pretty easy by itself, unfortunately it turns out we have consumed all the bits for `arming_checks` so i had to add param conversion for it, to get it to have bits (we can still only use of them sadly)."
__label__NO ">this also makes it easier to dump the keys for conversion, just to make it a single define change in the future."
__label__NO ">this is a draft as the conversion in sub is not working correctly."
__label__NO "for reference this is what the key dump prints on sub: `key : index : groupelement : arming_check: `"
__label__NO "reset last update"
__label__YES "fix and in case of rapid mode switching the pos_target aren't resetted."
__label__NO "for example: doing rtl -> stabilize -> rtl ."
__label__NO "going into stabilize will set pos_target.z to : now modertl::init call wp_nav->wp_and_spline_init() that don't reset z target and continue to climb_start() that calls wp_nav->set_wp_destination()."
__label__NO "since ((ap_hal::millis() - _wp_last_update) < ) is true, it get the origin from the pos_controller and that origin is false ..."
__label__YES "leading to a rapid descent to ground."
__label__NO ">the same behavior can be seen with guided -> stabilize -> guided"
__label__NO ">i think it is safe to reset the _last_update both on wp_nav and pos_controler each time we reinit the controler."
__label__YES "copter: detect and handle motor loss for improved redundancy"
__label__YES "motor mixers are based on a fixed mixing that limits the roll, pitch, yaw and thrust to prevent saturation of the motor outputs."
__label__YES "when a esc/motor/propeller fails there that motor tends to go to maximum limiting the average motor output (thrust) and the roll, pitch, and yaw authority."
__label__NO ">the motor mixers are designed to prioritise roll and pitch first, then yaw, followed by thrust."
__label__YES "this then represents the order in which control is lost."
__label__YES "first the aircraft will start to descend, more severe loss will result in loss of yaw control, followed finally by complete loss of attitude control."
__label__NO ">the severity may be limited by ensuring the aircraft is well tuned with the correct cg location and excess thrust."
__label__YES "yaw control can be given up earlier by reducing mot_yaw_headroom to ."
__label__YES "this may mean that yaw control is temporarily lost during aggressive maneuvers or extreme disturbances."
__label__YES ">the most vulnerable frame is the hex as any loss of motor control will make yaw control limited or impossible depending on the precise location of the cg."
__label__NO "this may be mitigated using a new propeller configuration: [copter: additional hex propeller configuration #]("
__label__NO ">the solution has two parts, detection and handling."
__label__NO ">**detection**: -this is most reliably done using esc feedback."
__label__NO "this should be a basic requirement of any can esc implementation (both failure and maximum thrust limitation)."
__label__YES "-this could also be done much less reliably by looking at the maximum thrust output to any motor and trigger a failure if a motor stays at full throttle for an extended period."
__label__NO "this may have many other implications in the case of a false positive and i do not recommend this approach."
__label__YES ">**handling**: - the simplest approach is to remove the ability for the compromised motor to limit the thrust of the remaining motors."
__label__YES "this will ensure we achieve a significantly higher maximum thrust and also maximise roll and pitch authority."
__label__YES "- the more complex and complete solution is to completly recalculate the motor mixing matrix based on the remaining motors potentially even including the limited thrust output of the compromised motor."
__label__NO "this is a much more ambitions goal and i would not recommend this approach in the first instance."
__label__YES ">this is an issue that encompases this issue: [copter: ensure hexacopter with failed motor can make safe landing #]( [.. hexacopter motor redundancy #]("
__label__NO ">to quote @rmackay -"
__label__NO ">> i had a chat with @lthall and there's two things we need: > > single motor failure detection."
__label__NO "leonard suggested we modify the ap_motors_matrix class so that it looks for a single motor >% while all other motors are <% (those percentages are guesses and could be modified based on testing)."
__label__NO "we should probably use a counter and/or bitmask so that the situation must continue for some amount of time (.sec?) before we decide the motor has failed and avoid false positives."
__label__NO "> based on the above checks, exclude the ""failed"" motor from the saturation handling code."
__label__NO "so for example, we should exclude from the calculation of ""rpy_low"" and ""rpy_high"" here in ap_motorsmatrix.cpp."
__label__YES "> according to leonard, doing this will theoretically allow the overall throttle of the motors to climb to % instead of the current % while still maintaining attitude control."
__label__YES "copter: ensure toshibacan escs shutdown when vehicle is disarmed"
